<template>
  <div>
  
    <el-table
      :data="classlist"
      style="width: 100%">
      <el-table-column
        prop="idclass"
        label="班级id"
        width="180">
      </el-table-column>
      <el-table-column
        prop="classname"
        label="班级名称"
        width="180">
      </el-table-column>
      <el-table-column
        prop="teacherName"
        label="教师名称">
      </el-table-column>
      <el-table-column
        prop="semester"
        label="学期">
      </el-table-column>
      <el-table-column
        prop="stuAmount"
        label="人数">
      </el-table-column>
      <el-table-column
        prop="opendate"
        label="开班时间">
      </el-table-column>
      <el-table-column
        prop="closedate"
        label="结课时间">
      </el-table-column>
      <el-table-column
        prop="status"
        label="状态">
      </el-table-column>
      <el-table-column label="操作" width="180px">
      <template slot-scope="scope">
        <el-button
          size="mini"
          @click="handleEdit(scope.$index, scope.row)">加入</el-button>
        <el-button
          size="mini"
          type="danger"
          @click="handleDelete(scope.$index, scope.row)">退出</el-button>
      </template>
    </el-table-column>
    </el-table>
  </div>
</template>
<<script>
export default {
  data(){
    return {
      classlist:[
        {
            "idclass": 1,
            "classname": "18秋软件测试",
            "teacherName": "教师1",
            "semester": "20182",
            "stuAmount": 54,
            "opendate": "2018-09-27",
            "closedate": "2018-11-29",
            "status": "已存档"
        },
        {
            "idclass": 2,
            "classname": "19春C++",
            "teacherName": "教师1",
            "semester": "20191",
            "stuAmount": 54,
            "opendate": "2019-03-10",
            "closedate": "2019-05-20",
            "status": "已开启"
        },
        {
            "idclass": 3,
            "classname": "19秋C程序设计",
            "teacherName": "教师1",
            "semester": "20192",
            "stuAmount": 34,
            "opendate": "2019-09-01",
            "closedate": "2019-11-02",
            "status": "待开班"
        }
    ]
    }
  }
}
</script>
